#include "Query.h"

Query::Query(Operator *op)
{
	parent = 0;

	node = new OperatorNode(op);
}

Query::~Query()
{
	delete node;

	for (std::vector <Query *> :: iterator i = lists.begin(); i != lists.end(); i++)
	{
		delete *i;
	}
}

void Query::addOperator(Operator *op)
{
	lists.push_back(new Query(op));
	(*(lists.end() - 1))->parent = this;
}

void Query::clear()
{
	delete this;
}
